<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>温度监控后台数据管理</title>

		<script type="text/javascript" src="layui/layui.js"></script>
		<link rel="stylesheet" href="layui/css/layui.css" />
		<link rel="stylesheet" href="css/my/nav.css" />
		<link rel="stylesheet" href="css/my/sideNav.css" />
		<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
	</head>

	<body>
		<div class="layui-layout layui-layout-admin">
			<ul class="layui-nav layui-bg-cyan myNav" lay-filter="">
				<li class="layui-nav-item">
					<a>xxxx</a>
				</li>
				<li class="layui-nav-item layui-this">
					<a href="">xxxx</a>
				</li>
				<li class="layui-nav-item">
					<a href="">xxxx</a>
				</li>
				<li class="layui-nav-item">
					<a href="javascript:;">xxxx</a>
					<dl class="layui-nav-child">
						<!-- 二级菜单 -->
						<dd>
							<a href="">xxxx</a>
						</dd>
						<dd>
							<a href="">xxxx</a>
						</dd>
						<dd>
							<a href="">xxxx</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item">
					<a id="alertSet">警戒值设定</a>
				</li>

				<ul class="layui-nav layui-bg-cyan layui-layout-right">
					<li class="layui-nav-item">
						<a href="javascript:;">
							<img src="http://t.cn/RCzsdCq" class="layui-nav-img"> 贤心
						</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="">xxxx</a>
							</dd>
							<dd>
								<a href="">xxxx</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="">退了</a>
					</li>
				</ul>

			</ul>

			<ul class="layui-nav layui-bg-cyan layui-nav-tree layui-nav-side sideNav" lay-filter="test">
				<!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
				<li class="layui-nav-item idetitle">
					<a href="">layui</a>
				</li>
				<li class="layui-nav-item layui-nav-itemed">
					<a>设备房间信息</a>
					<dl class="layui-nav-child">
						<dd>
							<a onclick="toiframeAlertReport()">警戒信息记录表</a>
						</dd>
						<dd>
							<a onclick="toiframeEquipmentTable()">设备表</a>
						</dd>
						<dd>
							<a onclick="toiframeRoomTable()">房间表</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item">
					<a>报表</a>
					<dl class="layui-nav-child">						
						<dd>
							<a onclick="toiframeMinReport()">MinReport</a>
						</dd>
						<dd>
							<a onclick="toiframeHoursReport()">HoursReport</a>
						</dd>
						<dd>
							<a onclick="toiframeDaysRepory()">DaysRepory</a>
						</dd>
						<dd>
							<a onclick="toiframeMonthReport()">MonthReport</a>
						</dd>
						<dd>
							<a onclick="toiframeYearReport()">YearReport</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item">
					<a href="">xxxx</a>
				</li>
				<li class="layui-nav-item">
					<a href="">xxxx</a>
				</li>
			</ul>

			<div class="layui-body">
				<!-- 内容主体区域 -->
				<iframe id="mainContent" scrolling="auto" src="" width="100%" height="100%"></iframe>
			</div>

			<div class="layui-footer">
				<!-- 底部固定区域 -->
				© layui.com - 底部固定区域
			</div>

		</div>
	</body>

	<script>
		//注意：导航 依赖 element 模块，否则无法进行功能性操作
		layui.use('element', function() {
			var element = layui.element;

			//一些事件监听
			element.on('tab(demo)', function(data) {
				console.log(data);
			});
		});
		//渲染layer
		layui.use('layer', function() {
			var layer = layui.layer;
		});
		//渲染form
		layui.use('form', function() {
			var form = layui.form;
			form.render();
			//监听提交
			form.on('submit(formDemo)', function(data) {
				layer.msg(JSON.stringify(data.field));
				return false;
			});
		});

		

		function toiframeEcharts() {
			document.getElementById("mainContent").src = 'view/testEcharts.html';
		}

		function toiframeDatetime() {
			document.getElementById("mainContent").src = 'view/datetime.html';
		}

		function toiframe() {
			document.getElementById("mainContent").src = 'buju.html';
		}
		
		function toiframeAlertReport() {
			document.getElementById("mainContent").src = 'view/alertReport.html';
		}
		
		function toiframeEquipmentTable() {
			document.getElementById("mainContent").src = 'view/equipmentTable.html';
		}
			
		
		function toiframeRoomTable(){
			document.getElementById("mainContent").src = 'view/roomTable.html';
		}

		function toiframeMinReport(){
			document.getElementById("mainContent").src = 'view/minReport.html';
		}
		
		function toiframeHoursReport(){
			document.getElementById("mainContent").src = 'view/hoursReport.html';
		}
		
		function toiframeDaysRepory(){
			document.getElementById("mainContent").src = 'view/daysRepory.html';
		}
		
		function toiframeMonthReport(){
			document.getElementById("mainContent").src = 'view/monthReport.html';
		}
		
		function toiframeYearReport(){
			document.getElementById("mainContent").src = 'view/yearReport.html';
		}

		$('#alertSet').on('click', function() {
			layer.open({
				type: 2,
				area: ['700px', '300px'],
				anim: 1,
				maxmin: true,
				scrollbar: false,
				content: 'view/alertSet.html' //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
			});
		});
	</script>

</html>